from celery_tasks.main import app
from libs.aliyun_mail.alibabacloud_sample.cust import Sms
from meiduo_mall.settings import EMAIL_HOST_USER
@app.task
def celery_send_sms_code(mobile,sms_code):
    Sms.main([mobile,sms_code])
@app.task
def celery_send_email(title,message,recipient_list,html_message=None):
    from django.core.mail import send_mail
    send_mail(subject=title,
              message=message,
              from_email=EMAIL_HOST_USER,
              recipient_list=recipient_list,
              html_message=html_message,
              )